<div class="container-fluid p-t-15">
	<div class="row">
		<div class="col-lg-12">
			<form id="organizationForm" class="form-horizontal validate" role="form"
				method="post" action="/system/organization/save">
				<input type="hidden" id="id" name="id" th:value="${entity?.id}" />
				<input type="hidden" name="enableFlag" value="1" />
				<input th:if="${pid != null}" type="hidden" name="fkParentOrganId" th:value="${pid}" />

				<div class="card">
					<div class="card-body">
						<div class="form-group">
							<label class="col-md-2 control-label">中文名称</label>
							<div class="col-md-3 validateDiv" >
								<input class="form-control" name="name" type="text"
									data-rule-required="true" 
									autocomplete="off" placeholder="中文名称"
									th:value="${entity?.name}" />
							</div>
							
							<label class="col-md-2 control-label">英文名称</label>
							<div class="col-md-3 validateDiv">
								<input class="form-control" name="enName" type="text"
									data-rule-required="true" 
									autocomplete="off" placeholder="英文名称"
									th:value="${entity?.enName}" />
							</div>
							
						</div>
						
						<div class="form-group">
							<label class="col-md-2 control-label">部门简称</label>
							<div class="col-md-3 validateDiv">
								<input class="form-control" name="shortName" type="text"
									data-rule-required="true" 
									autocomplete="off" placeholder="部门简称"
									th:value="${entity?.shortName}" />
							</div>
							
							<label class="col-md-2 control-label">部门英文简称</label>
							<div class="col-md-3 validateDiv">
								<input class="form-control" name="shortNameEn" type="text"
									data-rule-required="true" 
									autocomplete="off" placeholder="部门英文简称"
									th:value="${entity?.shortNameEn}" />
							</div>
							
						</div>
						
						<div class="form-group">
							<label class="col-md-2 control-label">代码</label>
							<div class="col-md-3 validateDiv">
								<input class="form-control" name="code" type="text"
									data-rule-required="true" 
									autocomplete="off" placeholder="代码"
									th:value="${entity?.code}" />
							</div>
														
							<label class="col-md-2 control-label">机构类型</label>
							<div class="col-md-3 validateDiv">
								<select
									class="form-control"
									name="type"
									data-rule-required="true"
									data-option="请选择"
									th:data-value="${entity?.type}"
									kjlink:pcode="organType">
								</select>
							</div>
							
						</div>
						
						<div class="form-group">
							<label class="col-md-2 control-label">是否市场部门</label>
							<div class="col-md-3 validateDiv">
								<select id="" class="form-control" name="marketingOrgan">
									<option value="">请选择</option>
									<option value="1" th:selected="${entity?.danger == '1'}">是</option>
									<option value="0" th:selected="${entity?.danger == '0'}">否</option>
								</select>
							</div>
							
							<label class="col-md-2 control-label">财务系统编号</label>
							<div class="col-md-3 validateDiv">
								<input class="form-control" name="financeCode" type="text"
									data-rule-required="true" 
									autocomplete="off" placeholder="财务系统编号"
									th:value="${entity?.financeCode}" />
							</div>
							
						</div>
						
						<div class="form-group">
							<label class="col-md-2 control-label">部门类型</label>
							<div class="col-md-3 validateDiv">
								<select id="" class="form-control" name="categoryName">
									<option value="">请选择</option>
									<option value="A" th:selected="${entity?.categoryName == 'A'}">一类部门</option>
									<option value="B" th:selected="${entity?.categoryName == 'B'}">二类部门</option>
									<option value="C" th:selected="${entity?.categoryName == 'C'}">三类部门</option>
									<option value="D" th:selected="${entity?.categoryName == 'D'}">四类部门</option>
									<option value="O" th:selected="${entity?.categoryName == 'O'}">其他</option>
								</select>
							</div>
							
							<label class="col-md-2 control-label">所属部门分类</label>
							<div class="col-md-3 validateDiv">
								<select id="" class="form-control" name="typeName">
									<option value="">请选择</option>
									<option value="Marketing" th:selected="${entity?.typeName == 'Marketing'}">业务营销部门</option>
									<option value="Cooperation" th:selected="${entity?.typeName == 'Cooperation'}">业务协作部门</option>
									<option value="Support" th:selected="${entity?.typeName == 'Support'}">业务支持部门</option>
								</select>
							</div>
							
						</div>
						
						<div class="form-group">
							<label class="col-md-2 control-label">描述</label>
							<div class="col-md-3 validateDiv">
								<textarea class="form-control" name="memo" rows="2" type="text"
									placeholder="描述" th:text="${entity?.memo}"></textarea>
							</div>
							
						</div>
						
						<div class="form-group">
							<label class="col-md-2 control-label">是否风险部门</label>
							<div class="col-md-3 validateDiv">
								<select id="" class="form-control" name="danger">
									<option value="">请选择</option>
									<option value="1" th:selected="${entity?.danger == '1'}">是</option>
									<option value="0" th:selected="${entity?.danger == '0'}">否</option>
								</select>
							</div>
							
							<label class="col-md-2 control-label">档案代码</label>
							<div class="col-md-3 validateDiv">
								<input class="form-control" name="fmsCode" type="text"
									autocomplete="off" placeholder="档案代码"
									th:value="${entity?.fmsCode}" />
							</div>
							
						</div>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
	<script type="text/javascript">$nojs.selectValueInitialization.init();</script> 
	<!-- 这个部门页面点击时候才触发，所以需要手工触发校验 -->
	<script type="text/javascript">$nojs.validation.init();</script> 
